<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>artTemplate-demo</title>
    <script src="../artTemplate-master/dist/template-native.js"></script>
    <script type="text/html" id="test">
      <h3><%= title %></h3>
      <ul>
          <% for(var i = 0; i < list.length; i++){ %>
              <li><%= list[i] %></li>
          <% } %>
      </ul>
    </script>
    <script>
      window.onload = function () {
        var dictionary = {
          title: "artTemplate-demo",
          list: ["apple", "banana", "pear", "tomato"],
        };
        var html = template("test", dictionary);
        document.getElementById("content").innerHTML = html;
      };
    </script>
  </head>
  <body>
    <div id="content"></div>
  </body>
</html>
